package Java练习.面向对象综合练习.多态;

public class person {
    private int a = 10;
    class Inner{
        private int a=20;
        public void show(){
            int a=30;
            //打印外部的成员变量a方法一
            System.out.println(new person().a);       //10
            //方法二
            System.out.println(person.this.a);//10
            System.out.println(this.a); //20
            System.out.println(a);      //30
        }
    }

    //测试
    public static void main(String[] args) {
        person.Inner inner=new person().new Inner();
        inner.show();
    }
}
